﻿using System;
using System.Collections;
using System.Reflection;
using ObjectBuilder;

namespace NServiceBus.Management.EndpointExplorer.Config
{
    public class ConfigEndpointExplorer
    {
        public ConfigEndpointExplorer(IBuilder builder)
        {
            compConfig = builder.ConfigureComponent(typeof(EndpointExplorerModel),ComponentCallModelEnum.Singleton);
        }

        private readonly IComponentConfig compConfig;

        public ConfigEndpointExplorer SetMessagesFromAssemblies(params Assembly[] assemblies)
        {
            compConfig.ConfigureProperty("MessageAssemblies", assemblies);
            return this;
        }
    }
}
